#include<iostream>
using namespace std;

class Date
{
public:
	Date(int year = 1, int month = 1, int day = 1)
	{
		_year = year;
		_month = month;
		_day = day;
	}

	void Print()
	{
		cout << _year << "-" << _month << "-" << _day << endl;
	}

	bool operator<(const Date& b)
	{
		if (_year < b._year)
		{
			return true;
		    if (_month < b._month)
		    {
			    return true;
				if (_day < b._day)
				{
					return true;
				}
		    }
		
		}
		return false;
		
	}



private:
	int _year;
	int _month;
	int _day;
};

int main()
{
	Date d1(2024, 2, 28);
	Date d2(d1);

	d1.Print();
	d2.Print();
	cout << (d1 < d2) << endl;

	return 0;
}